import 'dart:io';
import 'package:get/get.dart';
import 'package:flutter/material.dart';
import 'package:so_fast_vpn/routers/sf_routers.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

void main() async {

  WidgetsFlutterBinding.ensureInitialized();

  /// 配置中心初始化
  // await JXFQConfigCenter.instance.initConfigInfo();

  /// 用户中心初始化
  // await JXFQUserManager.instance.init();

  /// 注册appkey
  // JXFQHelperChannel().registerThirdAppKey();

  runApp(const MyApp());

}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return ScreenUtilInit(
      designSize: const Size(750, 1334),
      minTextAdapt: true,
      splitScreenMode: true,
      builder: (context, child) {
        return GetMaterialApp(
          builder: EasyLoading.init(),
          debugShowCheckedModeBanner: false,
          getPages: SFRouters.routers,
          initialRoute: SFRouters.home,
          // defaultTransition: Transition.rightToLeftWithFade,
        );
      },
    );
  }
}
